/*
	报表table组件
*/
define(
	[
		'require',
		'apm/bootstrap-table',
		'broada/base/text!./template.hbs'
	],
	function (require) {
		"use strict";

		var tableBootstrap = require('apm/bootstrap-table');
		var forEach = Ember.EnumerableUtils.forEach;
		var tpl = require('broada/base/text!./template.hbs');
		
		var ExportFormView= Ember.Component.extend({
			layout: Ember.HTMLBars.compile(tpl),
			didInsertElement: function(){
			  var ctrl = this.get("controller");
			  var $viewRoot = this.$();	  
			},
			dataChange: Ember.observer("data",function(){
				var ctrl = this;
				$('#table').bootstrapTable('destroy').bootstrapTable({
				    data: ctrl.get("data"),
				    columns: ctrl.get("columns")
				 });
				
			})
		});

		return ExportFormView;
	}
);